package com.example.demo.thread.ch5.case01;

import com.example.demo.thread.util.Tools;

/**
 * @author: htc
 * @date: Created in 17:28 2019/1/11.
 */
public class CaseRunner {
    final static AlarmAgent alarmAgent;

    static {
        alarmAgent = AlarmAgent.getInstance();
        alarmAgent.init();
    }

    public static void main(String[] args) throws InterruptedException {
        alarmAgent.sendAlarm("Database offline");
        Tools.randomPause(12000);
        alarmAgent.sendAlarm("XXX service unreachable!");
    }
}
